<!DOCTYPE HTML>
<html>
	<head>
		<meta http-equiv="Content-Type" content="html/html; charset=utf-8" />
		<title>SFSGameSettings Class Reference</title>
		<meta id="xcode-display" name="xcode-display" content="render"/>
		<link rel="stylesheet" type="text/css" href="../css/styles.css" media="all" />
		<link rel="stylesheet" type="text/css" media="print" href="../css/stylesPrint.css" />
		<meta name="generator" content="appledoc 2.2 (build 963)" />
	</head>
	<body>
		<header id="top_header">
			<div id="library" class="hideInXcode">
				<h1><a id="libraryTitle" href="../index.html">SFS2X API v1.3.7 </a></h1>
				<a id="developerHome" href="../index.html">gotoAndPlay() / A51 Integrated</a>
			</div>
			
			<div id="title" role="banner">
				<h1 class="hideInXcode">SFSGameSettings Class Reference</h1>
			</div>
			<ul id="headerButtons" role="toolbar">
				<li id="toc_button">
					<button aria-label="Show Table of Contents" role="checkbox" class="open" id="table_of_contents"><span class="disclosure"></span>Table of Contents</button>
				</li>
				<li id="jumpto_button" role="navigation">
					<select id="jumpTo">
	<option value="top">Jump To&#133;</option>
	
	<option value="overview">Overview</option>
	
	
	
	
	<option value="tasks">Tasks</option>
	
	
	
	
	
	<option value="properties">Properties</option>
	
	<option value="//api/name/invitationExpiryTime">&nbsp;&nbsp;&nbsp;&nbsp;invitationExpiryTime</option>
	
	<option value="//api/name/invitationParams">&nbsp;&nbsp;&nbsp;&nbsp;invitationParams</option>
	
	<option value="//api/name/invitedPlayers">&nbsp;&nbsp;&nbsp;&nbsp;invitedPlayers</option>
	
	<option value="//api/name/isPublic">&nbsp;&nbsp;&nbsp;&nbsp;isPublic</option>
	
	<option value="//api/name/leaveJoinedLastRoom">&nbsp;&nbsp;&nbsp;&nbsp;leaveJoinedLastRoom</option>
	
	<option value="//api/name/minPlayersToStartGame">&nbsp;&nbsp;&nbsp;&nbsp;minPlayersToStartGame</option>
	
	<option value="//api/name/notifyGameStarted">&nbsp;&nbsp;&nbsp;&nbsp;notifyGameStarted</option>
	
	<option value="//api/name/playerMatchExpression">&nbsp;&nbsp;&nbsp;&nbsp;playerMatchExpression</option>
	
	<option value="//api/name/searchableRooms">&nbsp;&nbsp;&nbsp;&nbsp;searchableRooms</option>
	
	<option value="//api/name/spectatorMatchExpression">&nbsp;&nbsp;&nbsp;&nbsp;spectatorMatchExpression</option>
	
	
	
	
	
	
	
</select>
				</li>
			</ul>
		</header>
		<nav id="tocContainer" class="isShowingTOC">
			<ul id="toc" role="tree">
				
<li role="treeitem"><span class="nodisclosure"></span><span class="sectionName"><a href="#overview">Overview</a></span></li>




<li role="treeitem" id="task_treeitem"><span class="nodisclosure"></span><span class="sectionName"><a href="#tasks">Tasks</a></span><ul>
	
</ul></li>





<li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#properties">Properties</a></span><ul>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/invitationExpiryTime">invitationExpiryTime</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/invitationParams">invitationParams</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/invitedPlayers">invitedPlayers</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/isPublic">isPublic</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/leaveJoinedLastRoom">leaveJoinedLastRoom</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/minPlayersToStartGame">minPlayersToStartGame</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/notifyGameStarted">notifyGameStarted</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/playerMatchExpression">playerMatchExpression</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/searchableRooms">searchableRooms</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/spectatorMatchExpression">spectatorMatchExpression</a></span></li>
	
</ul></li>






			</ul>
		</nav>
		<article>
			<div id="contents" class="isShowingTOC" role="main">
				<a title="SFSGameSettings Class Reference" name="top"></a>
				<div class="main-navigation navigation-top">
					<ul>
	<li><a href="../index.html">Index</a></li>
	<li><a href="../hierarchy.html">Hierarchy</a></li>
</ul>
				</div>
				<div id="header">
					<div class="section-header">
						<h1 class="title title-header">SFSGameSettings Class Reference</h1>
					</div>		
				</div>
				<div id="container">	
					
					<div class="section section-specification"><table cellspacing="0"><tbody>
						<tr>
	<td class="specification-title">Inherits from</td>
	<td class="specification-value"><a href="../Classes/RoomSettings.html">RoomSettings</a> : NSObject</td>
</tr><tr>
	<td class="specification-title">Declared in</td>
	<td class="specification-value">SFSGameSettings.h<br />SFSGameSettings.m</td>
</tr>
						</tbody></table></div>
					
                    
                    
					
					<div class="section section-overview">
						<a title="Overview" name="overview"></a>
						<h2 class="subtitle subtitle-overview">Overview</h2>
						<p>This class provides all the settings required to create an SFSGame(*).</p>

<p>The SFSGame(*) object extends the Room object providing new advanced features such as Player matching, Game invitations, public and private Games, quick game joining etc.</p>

<p>(*) = the <SFSGame> class exists only on the server side as extension of the <a href="../Classes/SFSRoom.html">SFSRoom</a> class. On the client side it&rsquo;s seen as a regular Room.</p>

<p>This is a quick overview of the settings that you can use to setup an <SFSGame></p>

<ul>
<li><b>isGamePublic</b>: a public game can be joined by any Player whose variables match the SFSGame Player Match Expression. Private games are based on invitations sent by the Game creator.</li>
<li><b>minPlayersToStartGame</b>: the minimum number of players to start the game.</li>
<li><b>invitedPlayers</b>: (private games only) a list of players invited in the Game</li>
<li><b>searchableRooms</b>: (private games only) a list of Rooms where the Game API can search for more players to invite.
      The API will look for more players if the number of people invited is smaller than the minPlayersToStartGame. This way you can add your friends to the game and let the system find more players to start it.</li>
<li><b>leaveLastJoinedRoom</b>: auto-remove players from their previous Room after successful join</li>
<li><b>playerMatchExpression</b>: an expression to match players willing to play the game, by default no expression is used</li>
<li><b>spectatorMatchExpression</b>: an expression to match spectators willing to play the game, by default no expression is used</li>
<li><b>invitationExpiryTime</b>: the amount of time allowed for invited players to accept / refuse</li>
<li><b>invitationParameters</b>: optional custom invitation parameters.These could provide details about the inviter, the game, an invitation message etc&hellip;</li>
<li><b>notifyGameStartedViaRoomVariable</b>: automatically update a reserved Room Variable to signal that the game is started/stopped. The Room variable uses the <b>global</b> setting to be broadcast outside of the Room. This can be used on the client side to show the game state in your game list.</li>
</ul>


<p>See <a href="../Classes/CreateSFSGameRequest.html">CreateSFSGameRequest</a>, <a href="../Classes/MatchExpression.html">MatchExpression</a></p>
					</div>
					
					
					
					
					
					<div class="section section-tasks">
						<a title="Tasks" name="tasks"></a>
						<h2 class="subtitle subtitle-tasks">Tasks</h2>
						
						
						
						

						<ul class="task-list">
							<li>
	<span class="tooltip">
		<code><a href="#//api/name/isPublic">&nbsp;&nbsp;isPublic</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/minPlayersToStartGame">&nbsp;&nbsp;minPlayersToStartGame</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/invitedPlayers">&nbsp;&nbsp;invitedPlayers</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/searchableRooms">&nbsp;&nbsp;searchableRooms</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/playerMatchExpression">&nbsp;&nbsp;playerMatchExpression</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/spectatorMatchExpression">&nbsp;&nbsp;spectatorMatchExpression</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/invitationExpiryTime">&nbsp;&nbsp;invitationExpiryTime</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/leaveJoinedLastRoom">&nbsp;&nbsp;leaveJoinedLastRoom</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/notifyGameStarted">&nbsp;&nbsp;notifyGameStarted</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/invitationParams">&nbsp;&nbsp;invitationParams</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li>
						</ul>
						
					</div>
					
					
					
					
					
					<div class="section section-methods">
						<a title="Properties" name="properties"></a>
						<h2 class="subtitle subtitle-methods">Properties</h2>
						
						<div class="section-method">
	<a name="//api/name/invitationExpiryTime" title="invitationExpiryTime"></a>
	<h3 class="subsubtitle method-title">invitationExpiryTime</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>The amount of time (in seconds) available for the User to reply to the invitation.
Suggested range 10-40 seconds</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (nonatomic, assign) NSInteger invitationExpiryTime</code></div>

    
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>The amount of time (in seconds) available for the User to reply to the invitation.
Suggested range 10-40 seconds</p>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SFSGameSettings.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/invitationParams" title="invitationParams"></a>
	<h3 class="subsubtitle method-title">invitationParams</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>An optional custom object with parameters (e.g. a message, game details etc&hellip;)</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (nonatomic, strong) id&lt;ISFSObject&gt; invitationParams</code></div>

    
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>An optional custom object with parameters (e.g. a message, game details etc&hellip;)</p>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SFSGameSettings.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/invitedPlayers" title="invitedPlayers"></a>
	<h3 class="subsubtitle method-title">invitedPlayers</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Private games only: a list of invited Players (an Array of Users)</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (nonatomic, strong) NSArray *invitedPlayers</code></div>

    
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>Private games only: a list of invited Players (an Array of Users)</p>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SFSGameSettings.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/isPublic" title="isPublic"></a>
	<h3 class="subsubtitle method-title">isPublic</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Check if the Game is public or private</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (nonatomic, assign) BOOL isPublic</code></div>

    
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>Check if the Game is public or private</p>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SFSGameSettings.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/leaveJoinedLastRoom" title="leaveJoinedLastRoom"></a>
	<h3 class="subsubtitle method-title">leaveJoinedLastRoom</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Determines if the Players will leave their previous Room when joining the Game</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (nonatomic, assign) BOOL leaveJoinedLastRoom</code></div>

    
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>Determines if the Players will leave their previous Room when joining the Game</p>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SFSGameSettings.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/minPlayersToStartGame" title="minPlayersToStartGame"></a>
	<h3 class="subsubtitle method-title">minPlayersToStartGame</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>The minimum number of players to start the Game</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (nonatomic, assign) NSInteger minPlayersToStartGame</code></div>

    
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>The minimum number of players to start the Game</p>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SFSGameSettings.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/notifyGameStarted" title="notifyGameStarted"></a>
	<h3 class="subsubtitle method-title">notifyGameStarted</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Uses a &ldquo;reserved&rdquo; global Room Variable to notify the started/stopped status of the game.
This depends on the numer of Users inside the Room.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (nonatomic, assign) BOOL notifyGameStarted</code></div>

    
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>Uses a &ldquo;reserved&rdquo; global Room Variable to notify the started/stopped status of the game.
This depends on the numer of Users inside the Room.</p>
	</div>
	
	
	
	
	
	<div class="method-subsection see-also-section">
		<h4 class="method-subtitle">See Also</h4>
		<ul>
			
			<li><code><p><a href="../Classes/SFSRoomVariable.html">SFSRoomVariable</a></p></code></li>
			
			<li><code><p><a href="../Classes/ReservedRoomVariables.html">ReservedRoomVariables</a></p></code></li>
			
		</ul>
	</div>
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SFSGameSettings.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/playerMatchExpression" title="playerMatchExpression"></a>
	<h3 class="subsubtitle method-title">playerMatchExpression</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>(Recommended for public Games only)
A MatchExpression for filtering Users joining the Game.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (nonatomic, strong) MatchExpression *playerMatchExpression</code></div>

    
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>(Recommended for public Games only)
A MatchExpression for filtering Users joining the Game.</p>
	</div>
	
	
	
	
	
	<div class="method-subsection see-also-section">
		<h4 class="method-subtitle">See Also</h4>
		<ul>
			
			<li><code><p><a href="../Classes/MatchExpression.html">MatchExpression</a></p></code></li>
			
		</ul>
	</div>
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SFSGameSettings.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/searchableRooms" title="searchableRooms"></a>
	<h3 class="subsubtitle method-title">searchableRooms</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Private games only: a list of room groups (Array of String) where to search for more players</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (nonatomic, strong) NSArray *searchableRooms</code></div>

    
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>Private games only: a list of room groups (Array of String) where to search for more players</p>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SFSGameSettings.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/spectatorMatchExpression" title="spectatorMatchExpression"></a>
	<h3 class="subsubtitle method-title">spectatorMatchExpression</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>A MatchExpression for filtering Spectators joining the Game.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (nonatomic, strong) MatchExpression *spectatorMatchExpression</code></div>

    
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>A MatchExpression for filtering Spectators joining the Game.</p>
	</div>
	
	
	
	
	
	<div class="method-subsection see-also-section">
		<h4 class="method-subtitle">See Also</h4>
		<ul>
			
			<li><code><p><a href="../Classes/MatchExpression.html">MatchExpression</a></p></code></li>
			
		</ul>
	</div>
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SFSGameSettings.h</code><br />
	</div>				
	
	
</div>
						
					</div>
					
					
					
					
					
					
                    
                    
				</div>
				<div class="main-navigation navigation-bottom">
					<ul>
	<li><a href="../index.html">Index</a></li>
	<li><a href="../hierarchy.html">Hierarchy</a></li>
</ul>
				</div>
				<div id="footer">
					<hr />
					<div class="footer-copyright">
						<p><span class="copyright">&copy; 2014 gotoAndPlay() / A51 Integrated. All rights reserved. (Last updated: 2014-10-13)</span><br />
						
						<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 963)</a>.</span></p>
						
					</div>
				</div>
			</div>
		</article>
		<script type="text/javascript">
			function jumpToChange()
			{
				window.location.hash = this.options[this.selectedIndex].value;
			}
			
			function toggleTOC()
			{
				var contents = document.getElementById('contents');
				var tocContainer = document.getElementById('tocContainer');
				
				if (this.getAttribute('class') == 'open')
				{
					this.setAttribute('class', '');
					contents.setAttribute('class', '');
					tocContainer.setAttribute('class', '');
					
					window.name = "hideTOC";
				}
				else
				{
					this.setAttribute('class', 'open');
					contents.setAttribute('class', 'isShowingTOC');
					tocContainer.setAttribute('class', 'isShowingTOC');
					
					window.name = "";
				}
				return false;
			}
			
			function toggleTOCEntryChildren(e)
			{
				e.stopPropagation();
				var currentClass = this.getAttribute('class');
				if (currentClass == 'children') {
					this.setAttribute('class', 'children open');
				}
				else if (currentClass == 'children open') {
					this.setAttribute('class', 'children');
				}
				return false;
			}
			
			function tocEntryClick(e)
			{
				e.stopPropagation();
				return true;
			}
			
			function init()
			{
				var selectElement = document.getElementById('jumpTo');
				selectElement.addEventListener('change', jumpToChange, false);
				
				var tocButton = document.getElementById('table_of_contents');
				tocButton.addEventListener('click', toggleTOC, false);
				
				var taskTreeItem = document.getElementById('task_treeitem');
				if (taskTreeItem.getElementsByTagName('li').length > 0)
				{
					taskTreeItem.setAttribute('class', 'children');
					taskTreeItem.firstChild.setAttribute('class', 'disclosure');
				}
				
				var tocList = document.getElementById('toc');
				
				var tocEntries = tocList.getElementsByTagName('li');
				for (var i = 0; i < tocEntries.length; i++) {
					tocEntries[i].addEventListener('click', toggleTOCEntryChildren, false);
				}
				
				var tocLinks = tocList.getElementsByTagName('a');
				for (var i = 0; i < tocLinks.length; i++) {
					tocLinks[i].addEventListener('click', tocEntryClick, false);
				}
				
				if (window.name == "hideTOC") {
					toggleTOC.call(tocButton);
				}
			}
			
			window.onload = init;
			
			// If showing in Xcode, hide the TOC and Header
			if (navigator.userAgent.match(/xcode/i)) {
				document.getElementById("contents").className = "hideInXcode"
				document.getElementById("tocContainer").className = "hideInXcode"
				document.getElementById("top_header").className = "hideInXcode"
			}
			
		</script>
	</body>
</html>